<template>
	<view>
		<view class="match-text-box" @tap="toList()">
			<text>匹配中...</text>
		</view>
<!-- 		<view class="heart-box">
			<image src="../../../static/img/match.gif" mode=""></image>
		</view> -->
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgm:''
			}
		},
		onShow() {
			uni.setNavigationBarTitle({
				title:"常规匹配"
			})
			// this.test();
		},
		methods: {
			 toUserMain(id){
				 uni.navigateTo({
				 	url:'../user-detail/user-detail?user_id='+id
				 })
			 },
			 toList(){
				 // this.bgm.stop();
				 // this.bgm.destroy();
				 uni.reLaunch({
				 	url:"../match-list/match-list"
				 })
			 },
			test(){
				this.bgm = uni.createInnerAudioContext();
				this.bgm.autoplay = true;
				this.bgm.src = '../../../static/musics/bgm/告白.mp3';
				this.bgm.onPlay(() => {
				  console.log('开始播放');
				});
				this.bgm.play();
				this.bgm.onError((res) => {
				  console.log(res.errMsg);
				  console.log(res.errCode);
				});
			}
		},
		// onHide() {
		// 	this.bgm.stop();
		// 	this.bgm.destroy();			
		// },
		// onBackPress() {
		// 	this.bgm.stop();
		// 	this.bgm.destroy();
		// }
	}
</script>

<style scoped>
	.match-text-box{
		width: 100%;
		margin-top: 30%;
		text-align: center;
	}
	.match-text-box text{
		font-size: 30px;
		color: #e35da2;
	}
	.heart-box{
		margin: 0 auto;
		width: 80%;
	}
	.heart-box image{
		margin: 0 auto;
		width: 100%;
	}
</style>
